 try{
	 
	 
	  function jsSelectItemByValue(objSelect_id,objItemText) {  
		  
		var objSelect=  document.getElementById(objSelect_id);
	        for(var i=0;i<objSelect.options.length;i++) {  
	            if(objSelect.options[i].value == objItemText) {  
	                objSelect.options[i].selected = true;  
	                break;  
	            }  
	        }  
	    }  
	function copyImg(controlId)
	{
	 
				var Url2=document.getElementById(controlId); 
			//	alert(Url2.src);
				controlRange = document.body.createControlRange(); 
			//	alert("a1");
				controlRange.addElement(Url2);
			//	alert("a2");
				controlRange.execCommand('Copy');  
	}
	 
	  function  submitConfirm(){
			// document.getElementsByName("submit").item(0).click();
			
			var code=document.getElementById('captcha').value;
		 	if(code.length==4)
		 	{
		 		if(confirm("验证码已经填写上了，需要提交吗"))
		 			document.getElementsByName("submit").item(0).click();//exit timer
		 	}else
		 			window.setTimeout(submitConfirm,4000);		 			
			
			}	
		
		
		function setAns(s)
		{
			//alert(s);
			try{ 
				  s=s.replace("=?","");
				   var rzt=eval(s);
				  document.getElementById('answer').value=rzt;	
			}catch(e)
			{
				//invok java prob lib solu
			}
			
			  
			//for invok raw check for can suto sumbit
			  checkanswer(rzt);
			 
			  //end
		}
	
  
	//auto setQuestAns 
	  function getQuest()
	  {
		//  window.clearInterval(int)
		  var s=  document.getElementById('questionstr').innerText;
	 
			if(s.length>0)
				{
				window.clearInterval(cyc_id);
				setAns(s);
			 
				}
				
		  
	  }
//	var cyc_id=  window.setInterval(getQuest,2000);
	// captch png 
	  function crackCaptch()
	  {
		//  window.clearInterval(int)
	 
		  var img=  document.getElementById('captchapng');
			if( img.width>10)
				{
				window.clearInterval(crackCaptch_handle);
				 
			     copyImg("captchapng");
				 mycallJava("getCaptch");
				}
				
		  
	  }
	//var crackCaptch_handle=  window.setInterval(crackCaptch,2000);

	
	  
	
	//window.setTimeout(submitConfirm,4000);
	 
//	mycallJava("getCaptch");
//function listCtrl($scope) { 
//alert();
//  $scope.listO7 =[ ] ; 
////	 $scope.listO7=[     {     "id": 1,     "no": 1,     "timex": 0   },     {     "id": 2,     "no": 2,     "timex": 0   }];
//
//} 
function bindTableData(data)
{
 	// alert( $('#tabid1'));
//	alert( $('#tabid1'));
//	alert(  $('#tabid1').scope()  );
	
	
 			 $('#tabid1').scope().listO7 = data;
		// 	 alert($('#formx'));
			   $('#tabid1').scope().$digest();	
	
}

function setBarlen()
{

var lenbars=$(".lenbar");
//alert(lenbars.length)
lenbars.each(function(index, element) { 
var wid=$(this).attr("width");
//alert(wid)
$(this).css("width",wid);
//	alert($(this).text());//p的内容}

 });
 
 }
 
// alert("{{hh".indexO
 function checkFinish(evt)
 {
	 try{
			 //  console.info("----------from  logx");
			logx("start chck ang finish thread");
		//	logx( $("#finishTag"));
			var txt= $("#finishTag").text();
		//	alert(txt);
	     	logx(txt.indexOf("{",0));
			if(txt.indexOf("{",0)>=0 )  //can find {{ brk,,,not finish
			{
				logx(" find {{ ");				
			}
			else
			{
				logx(" should angu load finish");				
				window.clearInterval(checkFinishTimerHandle);
				evt();
				
			}
	
	}catch(e)
	{
		 alert(e.number+":"+e.message+":"+e.lineNumber);
	}
 }
  var checkFinishTimerHandle;
 function setAngularFinishEvent(evt)
 {
	
	logx("start  setAngularFinishEvent   ");
	checkFinishTimerHandle =  window.setInterval(function(){
		checkFinish(evt);
		},500); 
	 
 }
 
 setAngularFinishEvent(function()
 {
	 	
	 setBarlen() ;
	 // 
 }
 
 );
 
 
 

 //setBarlen()

// 
//	window.setTimeout(function(){
//		// document.getElementsByName("submit").item(0).click();
//	//	var data=  mycallJava("getTimerData");
//	//	alert(data);
//	//try{
////	var data=[     {     "id": 1,     "no": 1,     "timex": 0   },     {     "id": 2,     "no": 2,     "timex": 0   }];
////	//	bindTableData(data);
////	}catch(e)
////	{
////		 alert(e.number+":"+e.message+":"+e.lineNumber);
////	}
////		
//		
//	},1000);
	
	

	
	//window.setTimeout(function(){
	//	alert("start to pub");
		//window.location="http://localhost/destoon/member/my.php?mid=5&action=add&aP4=js";
	//},25000);
  
	 }catch(e)
	 {
		 
		 alert(e.number+":"+e.message+":"+e.lineNumber);
	 }